﻿<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:awc="clr-namespace:Assergs.Windows.Controls;assembly=Assergs.Windows"
	xmlns:aw="clr-namespace:Assergs.Windows;assembly=Assergs.Windows"
	xmlns:dc="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.DateControls;assembly=J832.Wpf.BagOTricksLib"
	xmlns:rt="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.Transition;assembly=J832.Wpf.BagOTricksLib"
	xmlns:ui="clr-namespace:Bookvar.UI;assembly=Bookvar.UI"
	xmlns:commands="clr-namespace:Bookvar.UI.Commands;assembly=Bookvar.UI"
  xmlns:r="clr-namespace:Bookvar.UI.Localization;assembly=Bookvar.UI"
	xmlns:converters="clr-namespace:Bookvar.UI.Converters;assembly=Bookvar.UI"
	xmlns:local="clr-namespace:BookvarWpf"
	xmlns:book="clr-namespace:Bookvar.ObjectModel;assembly=Bookvar.ObjectModel"
	x:Class="BookvarWpf.MainPage"
  Title="{r:Resources BookvarTitleDefault}" 
  WindowTitle="{r:Resources BookvarTitleDefault}" 
  ShowsNavigationUI="False"
  >

    <Page.Resources>
        <local:TopicTemplateSelector x:Key="topicTemplateSelector" />
        <converters:DoubleToPercentageConverter x:Key="doubleToPercentageConverter" />
        <book:MindMap x:Key="mindMap" />
        <rt:RotateTransition x:Key="rotateTransition" x:Name="rotateTransition"
									 Duration="0:0:0.75" FieldOfView="40" Angle="90"/>

        <DataTemplate x:Key="CloseableTabHeaderTemplate" >
            <TextBlock  Text="{Binding Path=FileName}" />
    </DataTemplate>
    </Page.Resources>

    <DockPanel>
        <DockPanel.Background>
            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                <GradientStop Offset="0" Color="#9EBEE7" />
                <GradientStop Offset="0.7" Color="#567DB1" />
                <GradientStop Offset="1" Color="#6591CD" />
            </LinearGradientBrush>
        </DockPanel.Background>
        <awc:Ribbon DockPanel.Dock="Top" Height="115">
            <awc:RibbonTabItem Header="{r:Resources RibbonHomeTabHeaderText}" >
                <StackPanel Orientation="Horizontal">

                    <awc:RibbonPanel Header="{r:Resources RibbonBasicHeaderText}">
                        <StackPanel Orientation="Horizontal">
                            <awc:ImageButton 
                Orientation="Vertical" IsToolStyle="True" HorizontalAlignment="Left"
                Content="{r:Resources RibbonNewMindMapText}"
                ImageSource="Resources/Icons/32x32/New.png"
                Command="commands:BookvarCommands.CreateNewMap"
                CommandTarget="{Binding ElementName=mindMapPanel}">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/New (2).png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonNewMindMapTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton 
                                Orientation="Vertical" IsToolStyle="True" HorizontalAlignment="Left" 
                                Content="{r:Resources RibbonOpenMindMapText}"
                                ImageSource="Resources/Icons/32x32/Open.png"
                                Command="commands:BookvarCommands.OpenMap"
                                CommandTarget="{Binding ElementName=mindMapPanel}">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/Open (2).png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonOpenMindMapTooltip}" />
                                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>

                            <awc:DropDownButton>
                                <awc:DropDownMenuItem TopLevelButtonOrientation="Vertical" DropDownButtonMode="ToggleButtonOnly" 
                                      HeaderText="{r:Resources RibbonSaveMindMapText}" Command="commands:BookvarCommands.SaveMap" 
                                      CommandTarget="{Binding ElementName=mindMapPanel}"
                                      >
                                    <awc:DropDownMenuItem.Header>
                                        <Image Source="Resources/Icons/32x32/Save.png" />
                                    </awc:DropDownMenuItem.Header>
                                    <awc:DropDownMenuItem Header="{r:Resources RibbonSaveMindMapText}" 
                                        Command="commands:BookvarCommands.SaveMap" 
                                        CommandTarget="{Binding ElementName=mindMapPanel}"
                                        >
                                        <MenuItem.Icon>
                                            <Image Source="Resources/Icons/32x32/Save.png" />
                                        </MenuItem.Icon>
                                        <MenuItem.ToolTip>
                                            <StackPanel>
                                                <Image Source="Resources/Icons/128x128/Save.png" />
                                                <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonSaveMindMapTooltip}" />
                                            </StackPanel>
                                        </MenuItem.ToolTip>
                                    </awc:DropDownMenuItem>
                                    <awc:DropDownMenuItem Header="{r:Resources RibbonSaveMindMapAsText}" 
                                        Command="ApplicationCommands.SaveAs" 
                                        CommandTarget="{Binding ElementName=mindMapPanel}"
                                        >
                                        <MenuItem.Icon>
                                            <Image Source="Resources/Icons/32x32/Save.png" />
                                        </MenuItem.Icon>
                                        <MenuItem.ToolTip>
                                            <StackPanel>
                                                <Image Source="Resources/Icons/128x128/Save.png" />
                                                <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonSaveMindMapAsTooltip}" />
                                            </StackPanel>
                                        </MenuItem.ToolTip>
                                    </awc:DropDownMenuItem>
                                </awc:DropDownMenuItem>
                            </awc:DropDownButton>

                            <StackPanel VerticalAlignment="Center" >
                                <awc:ImageButton 
                                    Orientation="Horizontal" IsToolStyle="True" HorizontalAlignment="Left"
                                    Content="{r:Resources RibbonUndoText}"
                                    ImageSource="Resources/Icons/16x16/Undo.png"
                                    Command="ApplicationCommands.Undo">
                                    <awc:ImageButton.ToolTip>
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonUndoTooltip}" />
                                    </awc:ImageButton.ToolTip>
                                </awc:ImageButton>
                                <awc:ImageButton 
                                    Orientation="Horizontal" IsToolStyle="True" HorizontalAlignment="Left"
                                    Content="{r:Resources RibbonRedoText}"
                                    ImageSource="Resources/Icons/16x16/Redo.png"
                                    Command="ApplicationCommands.Redo">
                                    <awc:ImageButton.ToolTip>
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonRedoTooltip}" />
                                    </awc:ImageButton.ToolTip>
                                </awc:ImageButton>
                            </StackPanel>
                        </StackPanel>
                    </awc:RibbonPanel>

                    <awc:RibbonPanel Header="{r:Resources RibbonTopicHeaderText}">
                        <StackPanel Orientation="Horizontal">
                            <awc:DropDownButton>
                                <awc:DropDownMenuItem TopLevelButtonOrientation="Vertical" DropDownButtonMode="ToggleButtonOnly" 
                                      HeaderText="{r:Resources RibbonTopicAddHeaderText}" Command="commands:BookvarCommands.AddNewTopic" 
                                      CommandTarget="{Binding ElementName=mindMapPanel}"
                                      >
                                    <awc:DropDownMenuItem.Header>
                                        <Image Source="Resources/Icons/32x32/Add.png" />
                                    </awc:DropDownMenuItem.Header>
                                    <awc:DropDownMenuItem Header="{r:Resources RibbonAddTopicText}" 
                                        Command="commands:BookvarCommands.AddNewTopic" 
                                        CommandTarget="{Binding ElementName=mindMapPanel}"
                                        >
                                        <MenuItem.Icon>
                                            <Image Source="Resources/Icons/32x32/Add.png" />
                                        </MenuItem.Icon>
                                        <MenuItem.ToolTip>
                                            <StackPanel>
                                                <Image Source="Resources/Icons/128x128/Add.png" />
                                                <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonAddTopicTooltip}" />
                      </StackPanel>
                                        </MenuItem.ToolTip>
                                    </awc:DropDownMenuItem>
                                    <awc:DropDownMenuItem Header="{r:Resources RibbonAddSubtopicText}" 
                                        Command="commands:BookvarCommands.AddNewSubtopic" 
                                        CommandTarget="{Binding ElementName=mindMapPanel}" 
                                        >
                                        <MenuItem.Icon>
                                            <Image Source="Resources/Icons/32x32/Add.png" />
                                        </MenuItem.Icon>
                                        <MenuItem.ToolTip>
                                            <StackPanel>
                                                <Image Source="Resources/Icons/128x128/Add.png" />
                                                <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonAddSubtopicTooltip}" />
                      </StackPanel>
                                        </MenuItem.ToolTip>
                                    </awc:DropDownMenuItem>
                                    <awc:DropDownMenuItem Header="{r:Resources RibbonAddFloatingTopicText}" 
                                        Command="commands:BookvarCommands.AddNewFloatingTopic" 
                                        CommandTarget="{Binding ElementName=mindMapPanel}"
                                        >
                                        <MenuItem.Icon>
                                            <Image Source="Resources/Icons/32x32/Add.png" />
                                        </MenuItem.Icon>
                                        <MenuItem.ToolTip>
                                            <StackPanel>
                                                <Image Source="Resources/Icons/128x128/Add.png" />
                                                <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonAddFloatingTopicTooltip}" />
                      </StackPanel>
                                        </MenuItem.ToolTip>
                                    </awc:DropDownMenuItem>
                                </awc:DropDownMenuItem>
                            </awc:DropDownButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/remove.png" IsToolStyle="True" 
                               Command="commands:BookvarCommands.DeleteTopic" 
                               CommandTarget="{Binding ElementName=mindMapPanel}" 
                               Content="{r:Resources RibbonRemoveTopicText}" 
                               Orientation="Vertical"
                               >
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/remove.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonRemoveTopicTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/notes.png" IsToolStyle="True" 
                               HorizontalAlignment="Left" Command="commands:BookvarUICommands.ShowNotes" 
                               CommandTarget="{Binding ElementName=mindMapPanel}" 
                               Content="{r:Resources RibbonNotesText}" Orientation="Vertical"
                               >
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/notes.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonNotesTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/attachments.png" IsToolStyle="True"
                               Command="commands:BookvarUICommands.ShowAttachments" 
                               CommandTarget="{Binding ElementName=mindMapPanel}" 
                               Content="{r:Resources RibbonAttachmentsText}" Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/attachments.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonAttachmentsTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/image.png" IsToolStyle="True" 
                               HorizontalAlignment="Left" Click="OnAddImageClick"
                               Command="commands:BookvarCommands.AddImage" CommandTarget="{Binding ElementName=mindMapPanel}"
                               Content="{r:Resources RibbonImageText}" Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/image.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonImageTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/movie.png" IsToolStyle="True"
                               HorizontalAlignment="Left" Click="OnAddMovieClick" 
                               Command="commands:BookvarCommands.AddVideo" CommandTarget="{Binding ElementName=mindMapPanel}"
                               Content="{r:Resources RibbonMovieText}" Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/movie.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonMovieTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/link.png" IsToolStyle="True" HorizontalAlignment="Left"
                               Command="commands:BookvarUICommands.ShowHyperlink" 
                               CommandTarget="{Binding ElementName=mindMapPanel}" 
                               Content="{r:Resources RibbonLinkText}" Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/link.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonLinkTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                        </StackPanel>
                    </awc:RibbonPanel>

                    <awc:RibbonPanel Header="{r:Resources RibbonPresentationHeaderText}" >
                        <awc:ImageButton ImageSource="Resources/Icons/32x32/Presentation.png" IsToolStyle="True"
                             Click="btnPresentation_Click">
                            <awc:ImageButton.ToolTip>
                                <StackPanel>
                                    <Image Source="Resources/Icons/128x128/Presentation.png" />
                                    <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonPresentationTooltip}" />
                </StackPanel>
                            </awc:ImageButton.ToolTip>
                        </awc:ImageButton>
                    </awc:RibbonPanel>

                    <awc:RibbonPanel Header="{r:Resources RibbonOptionsHeaderText}">
                        <awc:ImageButton ImageSource="Resources/Icons/32x32/options32.png" IsToolStyle="True"
							Click="OnOptionsClicked">
                            <awc:ImageButton.ToolTip>
                                <StackPanel>
                                    <Image Source="Resources/Icons/128x128/options128.png" />
                                    <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonOptionsTooltip}" />
                </StackPanel>
                            </awc:ImageButton.ToolTip>
                        </awc:ImageButton>
                    </awc:RibbonPanel>

                    <awc:RibbonPanel Header="{r:Resources RibbonUpdateHeaderText}">
                        <awc:ImageButton ImageSource="Resources/Icons/32x32/Update.png" IsToolStyle="True"
							Click="OnUpdateCheckClicked">
                            <awc:ImageButton.ToolTip>
                                <StackPanel>
                                    <Image Source="Resources/Icons/128x128/Update.png" />
                                    <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonUpdateTooltip}" />
                </StackPanel>
                            </awc:ImageButton.ToolTip>
                        </awc:ImageButton>

                    </awc:RibbonPanel>
                </StackPanel>
            </awc:RibbonTabItem>

            <awc:RibbonTabItem Header="{r:Resources RibbonViewTabHeaderText}" >
                <StackPanel Orientation="Horizontal">
                    <awc:RibbonPanel Header="{r:Resources RibbonLayoutHeaderText}" >
                        <StackPanel Orientation="Horizontal" Margin="5,8,0,4">
                            <ComboBox Width="110" Height="20"  Margin="0,0,3,0" x:Name="combo" >
                                <ComboBoxItem x:Name="normalLayoutComboBoxItem"  Content="{r:Resources RibbonNormalLayoutText}" />
                                <ComboBoxItem x:Name="mindmapLayoutComboBoxItem" Content="{r:Resources RibbonMindMapLayoutText}" IsSelected="True" />
                                <ComboBoxItem x:Name="balancedLayoutComboBoxItem" Content="{r:Resources RibbonBalanceMindmapLayoutText}" />
                                <ComboBoxItem x:Name="timelineLayoutComboBoxItem" Content="{r:Resources RibbonTimelineLayoutText}" />
                            </ComboBox>
                            <awc:ImageButton Orientation="Vertical" IsToolStyle="true"
                               ImageSource="Resources/Icons/32x32/balance32.png" HorizontalAlignment="Left"
                               Content="{r:Resources RibbonBalanceMindMapText}"  Command="commands:BookvarCommands.BalanceMap" 
                               CommandTarget="{Binding ElementName=mindMapPanel}" >
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/balance128.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonBalanceMindMapTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                        </StackPanel>
                    </awc:RibbonPanel>
                    <awc:RibbonPanel Header="{r:Resources RibbonTimelineHeaderText}" >
                        <StackPanel VerticalAlignment="Center">
                            <dc:DatePicker x:Name="startDatePicker" Width="110" Height="20" />
                            <dc:DatePicker x:Name="endDatePicker" Width="110" Height="20" />
                        </StackPanel>
                    </awc:RibbonPanel>
                    <awc:RibbonPanel Header="{r:Resources RibbonSkinHeaderText}" >
                        <StackPanel Orientation="Horizontal" Margin="5,8,0,4">
                            <ComboBox Width="110" Height="20" Margin="0,0,3,0" 
                        x:Name="cmbSkins">
                                <ComboBoxItem DataContext="pack://application:,,,/BookvarWPF;component/Resources/Topic/DefaultStyles.xaml" Content="{r:Resources RibbonSkinNormalText}" IsSelected="True" />
                                <ComboBoxItem DataContext="pack://application:,,,/BookvarWPF;component/Resources/Topic/StylishTopic.xaml" Content="{r:Resources RibbonSkinStylishText}" />
                            </ComboBox>
                        </StackPanel>
                    </awc:RibbonPanel>
                </StackPanel>
            </awc:RibbonTabItem>

            <awc:RibbonTabItem Header="{r:Resources RibbonCollaborationTabHeaderText}" >
                <StackPanel Orientation="Horizontal">

                    <awc:RibbonPanel Header="{r:Resources RibbonCollaborationHeaderText}">
                        <StackPanel Orientation="Horizontal">
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/StartServer32.png" IsToolStyle="True"
                               x:Name="btnStartServer" Click="btnStartServer_Click"
                               Content="{r:Resources RibbonStartServerText}" Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/StartServer128.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonStartServerTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/StopServer32.png" IsToolStyle="True"
                               x:Name="btnStopServer" Click="btnStopServer_Click" Visibility="Collapsed"
                               Content="{r:Resources RibbonStopServerText}" Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/StopServer128.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonStopServerTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/Connect32.png" IsToolStyle="True"
                               x:Name="btnConnectToServer" Click="btnConnectToServer_Click"
                               Content="{r:Resources RibbonConnectToServerText}" Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/Connect128.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonConnectToServerTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                            <awc:ImageButton ImageSource="Resources/Icons/32x32/Disconnect32.png" IsToolStyle="True"
                               x:Name="btnDisconnectFromServer" Click="btnDisconnectFromServer_Click"
                               Visibility="Collapsed" Content="{r:Resources RibbonDisconnectFromServerText}"
                               Orientation="Vertical">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/Disconnect128.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonDisconnectFromServerTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                        </StackPanel>
                    </awc:RibbonPanel>
                </StackPanel>
            </awc:RibbonTabItem>

            <awc:RibbonTabItem Header="{r:Resources RibbonWebTabHeaderText}" >
                <StackPanel Orientation="Horizontal">
                    <awc:RibbonPanel Header="{r:Resources RibbonWebSiteHeaderText}" >
                        <StackPanel Orientation="Horizontal">
                            <awc:ImageButton Orientation="Vertical" x:Name="btnPublishMap" IsToolStyle="True"
                               ImageSource="Resources/Icons/32x32/Publish.png" HorizontalAlignment="Left"
                               Click="btnPublishMap_Click" Content="{r:Resources RibbonPublishText}">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/publish.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonPublishTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                        </StackPanel>
                    </awc:RibbonPanel>
                    <awc:RibbonPanel Header="{r:Resources RibbonLiveImagesHeaderText}" >
                        <StackPanel Orientation="Horizontal">
                            <awc:ImageButton Orientation="Vertical" x:Name="btnSearchImages" 
                               ImageSource="Resources/Icons/32x32/Search.png" HorizontalAlignment="Left"
                               Content="{r:Resources RibbonImageSearchText}" Click="btnSearchImages_Click" 
                               IsToolStyle="True">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/SearchImages.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonImageSearchTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                        </StackPanel>
                    </awc:RibbonPanel>
                </StackPanel>
            </awc:RibbonTabItem>
            <awc:RibbonTabItem Header="{r:Resources RibbonAddinsTabHeaderText}" >
                <StackPanel Orientation="Horizontal" x:Name="addinsStackPanel">
                    <awc:RibbonPanel Header="{r:Resources RibbonConsoleHeaderText}" >
                        <StackPanel Orientation="Horizontal">
                            <awc:ImageButton Orientation="Vertical" x:Name="btnConsole" 
                               ImageSource="Resources/Icons/32x32/Console.png" HorizontalAlignment="Left" 
                               Click="btnConsole_Click" IsToolStyle="True">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/Console.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonConsoleTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                        </StackPanel>
                    </awc:RibbonPanel>
                </StackPanel>
            </awc:RibbonTabItem>

            <awc:RibbonTabItem Header="{r:Resources RibbonBugTabHeaderText}" >
                <StackPanel Orientation="Horizontal">
                    <awc:RibbonPanel Header="{r:Resources RibbonBugHeaderText}">
                        <StackPanel Orientation="Horizontal">
                            <awc:ImageButton Orientation="Vertical" x:Name="btnBug" 
                               ImageSource="Resources/Icons/32x32/report_bug.png" HorizontalAlignment="Left" 
                               Click="btnBug_Click" IsToolStyle="True">
                                <awc:ImageButton.ToolTip>
                                    <StackPanel>
                                        <Image Source="Resources/Icons/128x128/report_bug.png" />
                                        <TextBlock Padding="0,5,0,0" Text="{r:Resources RibbonBugTooltip}" />
                  </StackPanel>
                                </awc:ImageButton.ToolTip>
                            </awc:ImageButton>
                        </StackPanel>
                    </awc:RibbonPanel>
                </StackPanel>
            </awc:RibbonTabItem>

        </awc:Ribbon>

        <Grid x:Name="root">

            <Path Fill="#FF97B6DC" Stretch="Fill" Stroke="#FFAEC7E8" Width="505" Data="M0.5,0.5L480.5,0.5C362.06667,12.09897,210.5,53.233083,0.5,169.5z" StrokeThickness="1.5" HorizontalAlignment="Left" VerticalAlignment="Top" Height="159" />
            <Path Fill="#FFAEC7E8" Stretch="Fill" HorizontalAlignment="Left" Width="505" Data="M0.5,0.5L480.5,0.5C362.06667,12.09897,210.5,53.233083,0.5,169.5z" VerticalAlignment="Top" Height="134" />

            <StackPanel Background="#FF90B6EA" Width="24" Panel.ZIndex="100"  HorizontalAlignment="Left">
                <ui:CloseableTabControl Width="20" x:Name="tabs" TabStripPlacement="Left" Height="2000"  Margin="2,0,0,0"
                                HorizontalAlignment="Left" ItemTemplate="{StaticResource CloseableTabHeaderTemplate}" />
            </StackPanel>
            <rt:TransitionPresenter x:Name="rotationPresenter"
									ClipToBounds ="True"
									 Visibility="Hidden"
									 Margin="10"
									 MaxWidth="2000" MaxHeight="2000">
                <rt:TransitionPresenter.Resources>
                    <DataTemplate DataType="{x:Type local:Picture}">
                        <Border Background="Transparent" BorderThickness="1" BorderBrush="Black">
                            <Image Source="{Binding Path=Uri}" Margin="2"/>
                        </Border>
                    </DataTemplate>
                </rt:TransitionPresenter.Resources>
                <rt:TransitionPresenter.Transition>
                    <StaticResource ResourceKey="rotateTransition"/>
                </rt:TransitionPresenter.Transition>
            </rt:TransitionPresenter>
            <ScrollViewer x:Name="scrollViewer"  Margin="24,2,2,2"  VerticalScrollBarVisibility="Visible"
                    HorizontalScrollBarVisibility="Visible" FocusVisualStyle="{x:Null}" Focusable="False" >
                <ui:MindMapPanel x:Name="mindMapPanel" Width="2000" Height="2000" TopicTemplateSelector="{StaticResource topicTemplateSelector}" 
            Mindmap="{StaticResource mindMap}" />
            </ScrollViewer>
            <aw:ToolWindowDockPanel x:Name="content"/>
            <StackPanel Style="{StaticResource ZoomAreaStyle}">
                <Border Style="{StaticResource SliderBorderStyle}">
                    <StackPanel>
                        <Label Style="{StaticResource ZoomLabelStyle}" 
                   Content="{Binding Path=Value, Converter={StaticResource doubleToPercentageConverter}, 
                            ElementName=zoomer}" />

                        <Slider Value="1" Maximum="6" IsMoveToPointEnabled="True" TickPlacement="BottomRight" Ticks="0.5, 1, 6"
                    Minimum="0.5" Style="{StaticResource ZoomSliderStyle}" x:Name="zoomer"  />
                        <Label Style="{StaticResource ZoomLabelStyle}" Content="{r:Resources MindMapZoomerText}" />
                    </StackPanel>
                </Border>
            </StackPanel>
        </Grid>
    </DockPanel>
</Page>
